/*
https://leetcode.cn/problems/split-the-array/description/
3046. 分割数组
*/

class Solution {
public:
    bool isPossibleToSplit(vector<int>& nums) {
        unordered_map<int,int>mp;
        for(int i=0;i<nums.size();i++)
        mp[nums[i]]++;
        for(auto it : mp)
        if(it.second>2) return false;
        return true;
    }
};